home *** CD-ROM | disk | FTP | other *** search
/ BMUG Newsletter 1996 Spring / S96 NL CD.iso / New NL PD Collections / Sound Manager 3.1 / For Programmers / Interfaces / SoundComponents.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-08-24  |  16.7 KB  |  447 lines  |  [TEXT/MPS ]

  1. /*
  2.      File:        SoundComponents.h
  3.  
  4.      Contains:    Sound Components Interfaces.
  5.  
  6.      Copyright:    © 1984-1995 by Apple Computer, Inc.
  7.                  All rights reserved.
  8.  
  9.      Bugs:        Report bugs to Radar component “System Interfaces”, “Latest”
  10.  
  11. */
  12.  
  13. #ifndef __SOUNDCOMPONENTS__
  14. #define __SOUNDCOMPONENTS__
  15.  
  16. #ifndef rez
  17.  
  18. #ifndef __TYPES__
  19. #include <Types.h>
  20. #endif
  21. /*    #include <ConditionalMacros.h>                                */
  22.  
  23. #ifndef __COMPONENTS__
  24. #include <Components.h>
  25. #endif
  26. /*    #include <MixedMode.h>                                        */
  27.  
  28. #ifndef __SOUND__
  29. #include <Sound.h>
  30. #endif
  31.  
  32. #ifdef __cplusplus
  33. extern "C" {
  34. #endif
  35.  
  36. #if PRAGMA_ALIGN_SUPPORTED
  37. #pragma options align=mac68k
  38. #endif
  39.  
  40. #if PRAGMA_IMPORT_SUPPORTED
  41. #pragma import on
  42. #endif
  43.  
  44. #endif /* rez */
  45.  
  46.  
  47. /*
  48.                         * * *  N O T E  * * *
  49.  
  50.     This file has been updated to include Sound Manager 3.1 interfaces.
  51.  
  52.     Some of the Sound Manager 3.0 interfaces were not put into the InterfaceLib
  53.     that originally shipped with the PowerMacs. These missing functions and the
  54.     new 3.1 interfaces have been released in the SoundLib library for PowerPC
  55.     developers to link with. The runtime library for these functions are
  56.     installed by Sound Manager 3.1. The following functions are found in SoundLib.
  57.  
  58.         AudioGetBass, AudioGetInfo, AudioGetMute, AudioGetOutputDevice,
  59.         AudioGetTreble, AudioGetVolume, AudioMuteOnEvent, AudioSetBass,
  60.         AudioSetMute, AudioSetToDefaults, AudioSetTreble, AudioSetVolume,
  61.         OpenMixerSoundComponent, CloseMixerSoundComponent, SoundComponentAddSource,
  62.         SoundComponentGetInfo, SoundComponentGetSource, SoundComponentGetSourceData,
  63.         SoundComponentInitOutputDevice, SoundComponentPauseSource,
  64.         SoundComponentPlaySourceBuffer, SoundComponentRemoveSource,
  65.         SoundComponentSetInfo, SoundComponentSetOutput, SoundComponentSetSource,
  66.         SoundComponentStartSource, SoundComponentStopSource
  67. */
  68.  
  69.  
  70. /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
  71. /* constants*/
  72. /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
  73.  
  74.  
  75. /*sound component types and subtypes*/
  76. #define kNoSoundComponentType            '****'
  77.  
  78.  
  79. #define kSoundComponentType                'sift'
  80. #define     kRate8SubType                'ratb'        /*8-bit rate converter*/
  81. #define     kRate16SubType                'ratw'        /*16-bit rate converter*/
  82. #define kConverterSubType                'conv'        /*sample format converter*/
  83. #define kSndSourceSubType                'sour'        /*generic source component*/
  84.  
  85.  
  86. #define kMixerType                        'mixr'
  87. #define     kMixer8SubType                'mixb'        /*8-bit mixer*/
  88. #define     kMixer16SubType                'mixw'        /*16-bit mixer*/
  89.  
  90.  
  91. #define kSoundOutputDeviceType            'sdev'        /*sound output component*/
  92. #define        kClassicSubType                'clas'        /*classic hardware, i.e. Mac Plus*/
  93. #define     kASCSubType                    'asc '        /*Apple Sound Chip device*/
  94. #define     kDSPSubType                    'dsp '        /*DSP device*/
  95. #define     kAwacsSubType                'awac'        /*Another of Will's Audio Chips device*/
  96. #define     kGCAwacsSubType                'awgc'        /*Awacs audio with Grand Central DMA*/
  97. #define     kSingerSubType                'sing'        /*Singer (via Whitney) based sound*/
  98. #define     kSinger2SubType                'sng2'        /*Singer 2 (via Whitney) for Acme*/
  99.  
  100.  
  101. #define kSoundCompressor                'scom'
  102. #define kSoundDecompressor                'sdec'
  103. #define     kMace3SubType                'MAC3'        /*MACE 3:1*/
  104. #define     kMace6SubType                'MAC6'        /*MACE 6:1*/
  105. #define     kCDXA4SubType                'cdx4'        /*CD/XA 4:1*/
  106. #define     kCDXA2SubType                'cdx2'        /*CD/XA 2:1*/
  107. #define     kIMA4SubType                'ima4'        /*IMA 4:1*/
  108. #define     kULawSubType                'ulaw'        /*µLaw 2:1*/
  109. #define        kLittleEndianSubType        'sowt'        /*Little-endian*/
  110.  
  111.  
  112. /*Audio components and sub-types*/
  113. #define kAudioComponentType                'adio'
  114. #define        kAwacsPhoneSubType            'hphn'
  115. #define        kAudioVisionSpeakerSubType    'telc'
  116. #define        kAudioVisionHeadphoneSubType 'telh'
  117. #define        kSonyTunerSubType            'tvav'
  118.  
  119.  
  120. /*features flags*/
  121. #define k8BitRawIn                    (1 << 0)    /*data description*/
  122. #define k8BitTwosIn                    (1 << 1)
  123. #define k16BitIn                    (1 << 2)
  124. #define kStereoIn                    (1 << 3)
  125. #define k8BitRawOut                    (1 << 8)
  126. #define k8BitTwosOut                (1 << 9)
  127. #define k16BitOut                    (1 << 10)
  128. #define kStereoOut                    (1 << 11)
  129.  
  130.  
  131. #define kReverse                    0x00010000   /* (1L << 16) */ /*function description*/
  132. #define kRateConvert                0x00020000   /* (1L << 17) */
  133. #define kCreateSoundSource            0x00040000   /* (1L << 18) */
  134.  
  135.  
  136. #define kHighQuality                0x00400000   /* (1L << 22) */ /*performance description*/
  137. #define kNonRealTime                0x00800000   /* (1L << 23) */
  138.  
  139.  
  140. #ifndef rez
  141.  
  142. enum {
  143. /*sound component set/get info selectors*/
  144.     siVolume                    = 'volu',
  145.     siHardwareVolume            = 'hvol',
  146.     siSpeakerVolume                = 'svol',
  147.     siHeadphoneVolume            = 'pvol',
  148.     siHardwareVolumeSteps        = 'hstp',
  149.     siHeadphoneVolumeSteps        = 'hdst',
  150.     siHardwareMute                = 'hmut',
  151.     siSpeakerMute                = 'smut',
  152.     siHeadphoneMute                = 'pmut',
  153.     siRateMultiplier            = 'rmul',
  154.     siQuality                    = 'qual',
  155. /*format types*/
  156.     kOffsetBinary                = 'raw ',
  157.     kTwosComplement                = 'twos',
  158.     kMACE3Compression            = 'MAC3',
  159.     kMACE6Compression            = 'MAC6'
  160. };
  161.  
  162. /*quality flags*/
  163. enum {
  164. /*use interpolation in rate conversion*/
  165.     kBestQuality                = (1 << 0)
  166. };
  167.  
  168. enum {
  169. /*useful bit masks*/
  170.     kInputMask                    = 0x000000FF,                    /*masks off input bits*/
  171.     kOutputMask                    = 0x0000FF00,                    /*masks off output bits*/
  172.     kOutputShift                = 8,                            /*amount output bits are shifted*/
  173.     kActionMask                    = 0x00FF0000,                    /*masks off action bits*/
  174.     kSoundComponentBits            = 0x00FFFFFF
  175. };
  176.  
  177. enum {
  178. /*SoundComponentPlaySourceBuffer action flags*/
  179.     kSourcePaused                = (1 << 0),
  180.     kPassThrough                = (1L << 16),
  181.     kNoSoundComponentChain        = (1L << 17),
  182. /*flags for OpenMixerSoundComponent*/
  183.     kNoMixing                    = (1 << 0),                        /*don't mix source*/
  184.     kNoSampleRateConversion        = (1 << 1),                        /*don't convert sample rate (i.e. 11 kHz -> 22 kHz)*/
  185.     kNoSampleSizeConversion        = (1 << 2),                        /*don't convert sample size (i.e. 16 -> 8)*/
  186.     kNoSampleFormatConversion    = (1 << 3),                        /*don't convert sample format (i.e. 'twos' -> 'raw ')*/
  187.     kNoChannelConversion        = (1 << 4),                        /*don't convert stereo/mono*/
  188.     kNoDecompression            = (1 << 5),                        /*don't decompress (i.e. 'MAC3' -> 'raw ')*/
  189.     kNoVolumeConversion            = (1 << 6),                        /*don't apply volume*/
  190.     kNoRealtimeProcessing        = (1 << 7)                        /*won't run at interrupt time*/
  191. };
  192.  
  193. /*Audio Component constants*/
  194. enum {
  195. /*Values for whichChannel parameter*/
  196.     audioAllChannels            = 0,                            /*All channels (usually interpreted as both left and right)*/
  197.     audioLeftChannel            = 1,                            /*Left channel*/
  198.     audioRightChannel            = 2,                            /*Right channel*/
  199. /*Values for mute parameter*/
  200.     audioUnmuted                = 0,                            /*Device is unmuted*/
  201.     audioMuted                    = 1,                            /*Device is muted*/
  202. /*Capabilities flags definitions*/
  203.     audioDoesMono                = (1L << 0),                    /*Device supports mono output*/
  204.     audioDoesStereo                = (1L << 1),                    /*Device supports stereo output*/
  205.     audioDoesIndependentChannels = (1L << 2)                    /*Device supports independent software control of each channel*/
  206. };
  207.  
  208. /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
  209. /* typedefs*/
  210. /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
  211.  
  212.  
  213. /*ShortFixed consists of an 8 bit, 2's complement integer part in the high byte,*/
  214. /*with an 8 bit fractional part in the low byte; its range is -128 to 127.99609375*/
  215. typedef short ShortFixed;
  216.  
  217. typedef struct SoundComponentData SoundComponentData;
  218.  
  219. typedef struct SoundComponentData *SoundComponentDataPtr;
  220.  
  221. struct SoundComponentData {
  222.     long                            flags;
  223.     OSType                            format;
  224.     short                            numChannels;
  225.     short                            sampleSize;
  226.     UnsignedFixed                    sampleRate;
  227.     long                            sampleCount;
  228.     Byte                            *buffer;
  229.     long                            reserved;
  230. };
  231. typedef struct SoundParamBlock SoundParamBlock;
  232.  
  233. typedef SoundParamBlock *SoundParamBlockPtr;
  234.  
  235. typedef pascal Boolean (*SoundParamProcPtr)(SoundParamBlockPtr *pb);
  236.  
  237. #if GENERATINGCFM
  238. typedef UniversalProcPtr SoundParamUPP;
  239. #else
  240. typedef SoundParamProcPtr SoundParamUPP;
  241. #endif
  242.  
  243. struct SoundParamBlock {
  244.     long                            recordSize;                    /*size of this record in bytes*/
  245.     SoundComponentData                desc;                        /*description of sound buffer*/
  246.     UnsignedFixed                    rateMultiplier;                /*rate multiplier to apply to sound*/
  247.     short                            leftVolume;                    /*volumes to apply to sound*/
  248.     short                            rightVolume;
  249.     long                            quality;                    /*quality to apply to sound*/
  250.     ComponentInstance                filter;                        /*filter to apply to sound*/
  251.     SoundParamUPP                    moreRtn;                    /*routine to call to get more data*/
  252.     SoundParamUPP                    completionRtn;                /*routine to call when buffer is complete*/
  253.     long                            refCon;                        /*user refcon*/
  254.     short                            result;                        /*result*/
  255. };
  256. typedef struct privateSoundSource *SoundSource;
  257.  
  258. struct AudioInfo {
  259.     long                            capabilitiesFlags;            /*Describes device capabilities*/
  260.     long                            reserved;                    /*Reserved by Apple*/
  261.     unsigned short                    numVolumeSteps;                /*Number of significant increments between min and max volume*/
  262. };
  263. typedef struct AudioInfo AudioInfo;
  264.  
  265. typedef AudioInfo *AudioInfoPtr;
  266.  
  267. /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
  268. /* functions for sound components*/
  269. /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
  270. /*Sound Component dispatch selectors*/
  271.  
  272. enum {
  273. /*these calls cannot be delegated*/
  274.     kSoundComponentInitOutputDeviceSelect = 1,
  275.     kSoundComponentSetSourceSelect = 2,
  276.     kSoundComponentGetSourceSelect = 3,
  277.     kSoundComponentGetSourceDataSelect = 4,
  278.     kSoundComponentSetOutputSelect = 5,
  279.     kDelegatedSoundComponentSelectors = 0x0100,                    /*first selector that can be delegated up the chain*/
  280. /*these calls can be delegated and have own range*/
  281.     kSoundComponentAddSourceSelect = kDelegatedSoundComponentSelectors + 1,
  282.     kSoundComponentRemoveSourceSelect = kDelegatedSoundComponentSelectors + 2,
  283.     kSoundComponentGetInfoSelect = kDelegatedSoundComponentSelectors + 3,
  284.     kSoundComponentSetInfoSelect = kDelegatedSoundComponentSelectors + 4,
  285.     kSoundComponentStartSourceSelect = kDelegatedSoundComponentSelectors + 5,
  286.     kSoundComponentStopSourceSelect = kDelegatedSoundComponentSelectors + 6,
  287.     kSoundComponentPauseSourceSelect = kDelegatedSoundComponentSelectors + 7,
  288.     kSoundComponentPlaySourceBufferSelect = kDelegatedSoundComponentSelectors + 8
  289. };
  290.  
  291. /*Audio Component selectors*/
  292. enum {
  293.     kAudioGetVolumeSelect        = 0,
  294.     kAudioSetVolumeSelect        = 1,
  295.     kAudioGetMuteSelect            = 2,
  296.     kAudioSetMuteSelect            = 3,
  297.     kAudioSetToDefaultsSelect    = 4,
  298.     kAudioGetInfoSelect            = 5,
  299.     kAudioGetBassSelect            = 6,
  300.     kAudioSetBassSelect            = 7,
  301.     kAudioGetTrebleSelect        = 8,
  302.     kAudioSetTrebleSelect        = 9,
  303.     kAudioGetOutputDeviceSelect    = 10,
  304.     kAudioMuteOnEventSelect        = 129
  305. };
  306.  
  307.  
  308.  
  309. /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
  310. /* Sound Manager 3.0 utilities*/
  311. extern pascal OSErr OpenMixerSoundComponent(SoundComponentDataPtr outputDescription, long outputFlags, ComponentInstance *mixerComponent)
  312.  FOURWORDINLINE(0x203C, 0x0614, 0x0018, 0xA800);
  313. extern pascal OSErr CloseMixerSoundComponent(ComponentInstance ci)
  314.  FOURWORDINLINE(0x203C, 0x0218, 0x0018, 0xA800);
  315.  
  316.  
  317. /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
  318. /* basic sound component functions*/
  319. extern pascal ComponentResult SoundComponentInitOutputDevice(ComponentInstance ti, long actions)
  320.  FIVEWORDINLINE(0x2F3C, 4, 1, 0x7000, 0xA82A);
  321. extern pascal ComponentResult SoundComponentSetSource(ComponentInstance ti, SoundSource sourceID, ComponentInstance source)
  322.  FIVEWORDINLINE(0x2F3C, 8, 2, 0x7000, 0xA82A);
  323. extern pascal ComponentResult SoundComponentGetSource(ComponentInstance ti, SoundSource sourceID, ComponentInstance *source)
  324.  FIVEWORDINLINE(0x2F3C, 8, 3, 0x7000, 0xA82A);
  325. extern pascal ComponentResult SoundComponentGetSourceData(ComponentInstance ti, SoundComponentDataPtr *sourceData)
  326.  FIVEWORDINLINE(0x2F3C, 4, 4, 0x7000, 0xA82A);
  327. extern pascal ComponentResult SoundComponentSetOutput(ComponentInstance ti, SoundComponentDataPtr requested, SoundComponentDataPtr *actual)
  328.  FIVEWORDINLINE(0x2F3C, 8, 5, 0x7000, 0xA82A);
  329.  
  330.  
  331. /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
  332. /* junction methods for the mixer, must be called at non-interrupt level*/
  333. extern pascal ComponentResult SoundComponentAddSource(ComponentInstance ti, SoundSource *sourceID)
  334.  FIVEWORDINLINE(0x2F3C, 4, 0x0101, 0x7000, 0xA82A);
  335. extern pascal ComponentResult SoundComponentRemoveSource(ComponentInstance ti, SoundSource sourceID)
  336.  FIVEWORDINLINE(0x2F3C, 4, 0x0102, 0x7000, 0xA82A);
  337.  
  338.  
  339. /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
  340. /* info methods*/
  341. extern pascal ComponentResult SoundComponentGetInfo(ComponentInstance ti, SoundSource sourceID, OSType selector, void *infoPtr)
  342.  FIVEWORDINLINE(0x2F3C, 12, 0x0103, 0x7000, 0xA82A);
  343. extern pascal ComponentResult SoundComponentSetInfo(ComponentInstance ti, SoundSource sourceID, OSType selector, void *infoPtr)
  344.  FIVEWORDINLINE(0x2F3C, 12, 0x0104, 0x7000, 0xA82A);
  345.  
  346.  
  347. /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
  348. /* control methods*/
  349. extern pascal ComponentResult SoundComponentStartSource(ComponentInstance ti, short count, SoundSource *sources)
  350.  FIVEWORDINLINE(0x2F3C, 6, 0x0105, 0x7000, 0xA82A);
  351. extern pascal ComponentResult SoundComponentStopSource(ComponentInstance ti, short count, SoundSource *sources)
  352.  FIVEWORDINLINE(0x2F3C, 6, 0x0106, 0x7000, 0xA82A);
  353. extern pascal ComponentResult SoundComponentPauseSource(ComponentInstance ti, short count, SoundSource *sources)
  354.  FIVEWORDINLINE(0x2F3C, 6, 0x0107, 0x7000, 0xA82A);
  355. extern pascal ComponentResult SoundComponentPlaySourceBuffer(ComponentInstance ti, SoundSource sourceID, SoundParamBlockPtr pb, long actions)
  356.  FIVEWORDINLINE(0x2F3C, 12, 0x0108, 0x7000, 0xA82A);
  357.  
  358.  
  359. /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
  360. /* interface for Audio Components*/
  361. /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
  362.  
  363.  
  364. /*Volume is described as a value between 0 and 1, with 0 indicating minimum
  365.   volume and 1 indicating maximum volume; if the device doesn't support
  366.   software control of volume, then a value of unimpErr is returned, indicating
  367.   that these functions are not supported by the device*/
  368.  
  369.  
  370. extern pascal ComponentResult AudioGetVolume(ComponentInstance ac, short whichChannel, ShortFixed *volume)
  371.  FIVEWORDINLINE(0x2F3C, 6, 0, 0x7000, 0xA82A);
  372. extern pascal ComponentResult AudioSetVolume(ComponentInstance ac, short whichChannel, ShortFixed volume)
  373.  FIVEWORDINLINE(0x2F3C, 4, 1, 0x7000, 0xA82A);
  374.  
  375.  
  376. /*If the device doesn't support software control of mute, then a value of unimpErr is*/
  377. /*returned, indicating that these functions are not supported by the device*/
  378. extern pascal ComponentResult AudioGetMute(ComponentInstance ac, short whichChannel, short *mute)
  379.  FIVEWORDINLINE(0x2F3C, 6, 2, 0x7000, 0xA82A);
  380. extern pascal ComponentResult AudioSetMute(ComponentInstance ac, short whichChannel, short mute)
  381.  FIVEWORDINLINE(0x2F3C, 4, 3, 0x7000, 0xA82A);
  382.  
  383.  
  384. /*AudioSetToDefaults causes the associated device to reset its volume and mute values*/
  385. /*(and perhaps other characteristics, e.g. attenuation) to "factory default" settings*/
  386. extern pascal ComponentResult AudioSetToDefaults(ComponentInstance ac)
  387.  FIVEWORDINLINE(0x2F3C, 0, 4, 0x7000, 0xA82A);
  388.  
  389.  
  390. /*This routine is required; it must be implemented by all audio components*/
  391. extern pascal ComponentResult AudioGetInfo(ComponentInstance ac, AudioInfoPtr info)
  392.  FIVEWORDINLINE(0x2F3C, 4, 5, 0x7000, 0xA82A);
  393. extern pascal ComponentResult AudioGetBass(ComponentInstance ac, short whichChannel, short *bass)
  394.  FIVEWORDINLINE(0x2F3C, 6, 6, 0x7000, 0xA82A);
  395. extern pascal ComponentResult AudioSetBass(ComponentInstance ac, short whichChannel, short bass)
  396.  FIVEWORDINLINE(0x2F3C, 4, 7, 0x7000, 0xA82A);
  397. extern pascal ComponentResult AudioGetTreble(ComponentInstance ac, short whichChannel, short *Treble)
  398.  FIVEWORDINLINE(0x2F3C, 6, 8, 0x7000, 0xA82A);
  399. extern pascal ComponentResult AudioSetTreble(ComponentInstance ac, short whichChannel, short Treble)
  400.  FIVEWORDINLINE(0x2F3C, 4, 9, 0x7000, 0xA82A);
  401. extern pascal ComponentResult AudioGetOutputDevice(ComponentInstance ac, Component *outputDevice)
  402.  FIVEWORDINLINE(0x2F3C, 4, 10, 0x7000, 0xA82A);
  403.  
  404.  
  405. /*This is routine is private to the AudioVision component.  It enables the watching of the mute key.*/
  406. extern pascal ComponentResult AudioMuteOnEvent(ComponentInstance ac, short muteOnEvent)
  407.  FIVEWORDINLINE(0x2F3C, 2, 129, 0x7000, 0xA82A);
  408.  
  409.  
  410. enum {
  411.     uppSoundParamProcInfo = kPascalStackBased
  412.          | RESULT_SIZE(SIZE_CODE(sizeof(Boolean)))
  413.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(SoundParamBlockPtr*)))
  414. };
  415.  
  416. #if GENERATINGCFM
  417. #define NewSoundParamProc(userRoutine)        \
  418.         (SoundParamUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppSoundParamProcInfo, GetCurrentArchitecture())
  419. #else
  420. #define NewSoundParamProc(userRoutine)        \
  421.         ((SoundParamUPP) (userRoutine))
  422. #endif
  423.  
  424. #if GENERATINGCFM
  425. #define CallSoundParamProc(userRoutine, pb)        \
  426.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppSoundParamProcInfo, (pb))
  427. #else
  428. #define CallSoundParamProc(userRoutine, pb)        \
  429.         (*(userRoutine))((pb))
  430. #endif
  431.  
  432.  
  433. #if PRAGMA_IMPORT_SUPPORTED
  434. #pragma import off
  435. #endif
  436.  
  437. #if PRAGMA_ALIGN_SUPPORTED
  438. #pragma options align=reset
  439. #endif
  440.  
  441. #ifdef __cplusplus
  442. }
  443. #endif
  444.  
  445. #endif /* rez */
  446. #endif /* __SOUNDCOMPONENTS__ */
  447.